package com.hupu.jrs.components.notifier

import android.app.Notification
import android.app.NotificationManager
import javax.inject.Inject

/**
 * Created by Stark.Tony on 2018/3/18.
 */
open class Notifier {

    @Inject
    internal var notificationManager: NotificationManager? = null

    protected fun notify(id: Int, notification: Notification) {
        notificationManager!!.notify(id, notification)
    }

    fun cancelNotification(request: Int) {
        notificationManager!!.cancel(request)
    }

    fun cancelAll() {
        notificationManager!!.cancel(OfflineThreads)
        notificationManager!!.cancel(OfflineReplies)
        notificationManager!!.cancel(OfflinePicture)
    }

    companion object {
        val OfflineThreads = 9001// 离线帖子

        val OfflineReplies = 9002// 离线回复

        val OfflinePicture = 9003// 离线图片
    }
}
